<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- examples.qdoc -->
  <title>Qt Quick Examples and Tutorials | Qt Quick 5.12.3</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td ><a href="../qtdoc/index.html">Qt 5.12</a></td><td ><a href="qtquick-index.html">Qt Quick 模块</a></td><td >Qt Quick Examples and Tutorials</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtquick-index.html">Qt 5.12.3 参考指南</a></td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">目录</a></h3>
<ul>
<li class="level1"><a href="#running-the-examples-and-demos">Running the Examples and Demos</a></li>
<li class="level1"><a href="#qt-quick-demos">Qt Quick Demos</a></li>
<li class="level1"><a href="#developing-qt-quick-applications">Developing Qt Quick Applications</a></li>
<li class="level2"><a href="#extending-qml">Extending QML</a></li>
<li class="level1"><a href="#examples">Examples</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">Qt Quick Examples and Tutorials</h1>
<span class="subtitle"></span>
<!-- $$$qtquick-codesamples.html-description -->
<div class="descr"> <a name="details"></a>
<p>This page lists the <a href="../qtqml/qtqml-index.html">Qt QML</a> and <a href="qtquick-index.html">Qt Quick 模块</a> examples, however, many other <a href="../qtdoc/qtmodules.html">Qt modules</a> contain examples related to their QML API.</p>
<a name="running-the-examples-and-demos"></a>
<h2 id="running-the-examples-and-demos">Running the Examples and Demos</h2>
<p>The examples are packaged with the <a href="../qtdoc/gettingstarted.html">Qt installers</a> and are accessed through Qt Creator. For more information about running examples in Qt Creator, visit the <a href="http://doc.qt.io/qtcreator/creator-build-example-application.html">Building and Running an Example</a> page.</p>
<p>Open and run examples within Qt Creator's <b>Welcome</b> mode. Most of the examples run on various platforms and to search for platform-specific examples, type the platform name (or any keywords) in the search field. For example, typing <code>mobile</code> in the search field lists the examples that are fully compatible with the <a href="../qtdoc/topics-core.html#platform-support">mobile</a> platforms.</p>
<p>To view other examples and tutorials, visit the <a href="../qtdoc/qtexamplesandtutorials.html">Qt Examples And Tutorials</a> page.</p>
<a name="qt-quick-demos"></a>
<h2 id="qt-quick-demos">Qt Quick Demos</h2>
<p>Here is a list of fully-functional demo applications. They are full applications that show how a deployable Qt application is built and structured. Many of the demos are deployable to mobile and desktop platforms.</p>
<div class="table"><table class="annotated">
<tr class="odd topAlign"><td class="tblName"><p><a href="../qtdoc/qtdoc-demos-calqlatr-example.html">Qt Quick Demo - Calqlatr</a></p></td><td class="tblDescr"><p>A QML app designed for portrait devices that uses custom components, animated with AnimationController, and JavaScript for the application logic</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="../qtdoc/qtdoc-demos-clocks-example.html">Qt Quick Demo - Clocks</a></p></td><td class="tblDescr"><p>A QML clock application that demonstrates using a ListView type to display data generated by a ListModel and a SpringAnimation type to animate images</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="../qtdoc/qtdoc-demos-maroon-example.html">Qt Quick Demo - Maroon in Trouble</a></p></td><td class="tblDescr"><p>A Qt Quick game for touch devices that uses SpriteSequence, ParticleSystem, Emitter, and Wander types to animate objects and the SoundEffect type to play sound effects</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="../qtdoc/qtdoc-demos-photosurface-example.html">Qt Quick Demo - Photo Surface</a></p></td><td class="tblDescr"><p>A QML app for touch devices that uses a Repeater with a FolderListModel to access content in a folder, and a PinchArea that contains a MouseArea to handle pinch gestures on the fetched content</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="../qtdoc/qtdoc-demos-photoviewer-example.html">Qt Quick Demo - Photo Viewer</a></p></td><td class="tblDescr"><p>A QML photo viewer that that uses XmlListModel and XmlRole to download Flickr feeds, and Package to display the photos in different views</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="../qtdoc/qtdoc-demos-rssnews-example.html">Qt Quick Demo - RSS News</a></p></td><td class="tblDescr"><p>A QML RSS news reader that uses XmlListModel and XmlRole to download XML data, ListModel and ListElement to create a category list, and ListView to display the data</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="../qtdoc/qtdoc-demos-samegame-example.html">Qt Quick Demo - Same Game</a></p></td><td class="tblDescr"><p>A QML implementation of the popular puzzle game by Kuniaki Moribe</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="../qtdoc/qtdoc-demos-stocqt-example.html">Qt Quick Demo - StocQt</a></p></td><td class="tblDescr"><p>A configurable stock chart for the NASDAQ-100</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="../qtdoc/qtdoc-demos-tweetsearch-example.html">Qt Quick Demo - Tweet Search</a></p></td><td class="tblDescr"><p>A Twitter search client with 3D effects</p></td></tr>
</table></div>
<a name="developing-qt-quick-applications"></a>
<h2 id="developing-qt-quick-applications">Developing Qt Quick Applications</h2>
<p>The following pages show how to develop Qt applications using <a href="http://doc.qt.io/qtcreator/index.html">Qt Creator</a> and Qt Quick. The pages demonstrate various steps such as use cases and introductory material. For more information about Qt Quick Applications and related modules, visit the <a href="../qtdoc/qmlapplications.html">QML Applications</a> page.</p>
<div class="multi-column"><div class="doc-column"><p><b>Development Environment</b></p>
<ul>
<li><a href="http://doc.qt.io/qtcreator/quick-projects.html">Creating Qt Quick Projects</a></li>
<li><a href="http://doc.qt.io/qtcreator/quick-components.html">Creating Components</a></li>
<li><a href="http://doc.qt.io/qtcreator/quick-export-to-qml.html">Exporting Designs from Graphics Software</a></li>
<li><a href="http://doc.qt.io/qtcreator/creator-qml-modules-with-plugins.html">Using QML Modules with Plugins</a></li>
</ul>
</div><div class="doc-column"><p><b>Beginning with QML and Qt Quick</b></p>
<ul>
<li><a href="../qtdoc/qmlfirststeps.html">First Steps with QML</a></li>
<li><a href="../qtdoc/qtdoc-tutorials-alarms-example.html">Qt Quick Text Editor</a></li>
<li><a href="qml-advtutorial.html">SameGame</a></li>
</ul>
</div><div class="doc-column"><p><b>Use Cases</b></p>
<ul>
<li><a href="../qtdoc/qtquick-usecase-visual.html">Visual types in QML</a></li>
<li><a href="../qtdoc/qtquick-usecase-userinput.html">Responding to User Input in QML</a></li>
<li><a href="../qtdoc/qtquick-usecase-animations.html">Animations in QML</a></li>
<li><a href="../qtdoc/qtquick-usecase-text.html">Displaying Text in QML</a></li>
<li><a href="../qtdoc/qtquick-usecase-layouts.html">Layouts in QML</a></li>
<li><a href="../qtdoc/qtquick-usecase-styling.html">Style and Theme Support</a></li>
<li><a href="../qtdoc/qtquick-usecase-integratingjs.html">Integrating JavaScript in QML</a></li>
</ul>
</div></div><a name="extending-qml"></a>
<h3 >Extending QML</h3>
<p>The following tutorials show how a QML-based application can be combined with C++ code using the <a href="../qtqml/qtqml-index.html">Qt QML</a> module. For information about extending QML, visit the <a href="../qtqml/qtqml-cppintegration-topic.html">Integrating QML and C++</a> page.</p>
<div class="table"><table class="annotated">
<tr class="odd topAlign"><td class="tblName"><p><a href="../qtqml/qtqml-referenceexamples-adding-example.html">Extending QML - Adding Types Example</a></p></td><td class="tblDescr"><p>Exporting C++ Classes</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="../qtqml/qtqml-referenceexamples-attached-example.html">Extending QML - Attached Properties Example</a></p></td><td class="tblDescr"><p>Attached Properties</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="../qtqml/qtqml-referenceexamples-binding-example.html">Extending QML - Binding Example</a></p></td><td class="tblDescr"><p>Binding</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="../qtqml/qtqml-referenceexamples-default-example.html">Extending QML - Default Property Example</a></p></td><td class="tblDescr"><p>Default Property</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="../qtqml/qtqml-referenceexamples-extended-example.html">Extending QML - Extension Objects Example</a></p></td><td class="tblDescr"><p>Extension Objects</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="../qtqml/qtqml-referenceexamples-grouped-example.html">Extending QML - Grouped Properties Example</a></p></td><td class="tblDescr"><p>Grouped Properties</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="../qtqml/qtqml-referenceexamples-coercion-example.html">Extending QML - Inheritance and Coercion Example</a></p></td><td class="tblDescr"><p>C++ Inheritance and Coercion</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="../qtqml/qtqml-referenceexamples-methods-example.html">Extending QML - Methods Example</a></p></td><td class="tblDescr"><p>Methods Support</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="../qtqml/qtqml-referenceexamples-properties-example.html">Extending QML - Object and List Property Types Example</a></p></td><td class="tblDescr"><p>Exporting C++ Properties</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="../qtqml/qtqml-referenceexamples-valuesource-example.html">Extending QML - Property Value Source Example</a></p></td><td class="tblDescr"><p>Property Value Source</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="../qtqml/qtqml-referenceexamples-signal-example.html">Extending QML - Signal Support Example</a></p></td><td class="tblDescr"><p>Signal Support</p></td></tr>
</table></div>
<a name="examples"></a>
<h2 id="examples">Examples</h2>
<p>Examples are small applications which show how to implement various Qt Quick features. The examples run on various platforms and are opened from within Qt Creator.</p>
<div class="multi-column"><div class="doc-column"><p><b>QML Types and Controls</b></p>
<ul>
<li><a href="../qtquickcontrols/qtquickcontrols-gallery-example.html">Controls Gallery</a></li>
<li><a href="../qtquickdialogs/qtquickdialogs-systemdialogs-example.html">Dialog Examples</a></li>
<li><a href="../qtwidgets/qtwidgets-richtext-calendar-example.html">Calendar Example</a></li>
<li><a href="qtquick-tableview-gameoflife-example.html">TableView</a></li>
<li><a href="qtquick-text-example.html">Text and Fonts</a></li>
<li><a href="qmlexampletoggleswitch.html">Custom Toggle Switch</a></li>
</ul>
</div><div class="doc-column"><p><b>Layouts and Views</b></p>
<ul>
<li><a href="qtquick-layouts-example.html">Qt Quick Layouts - Basic Example</a></li>
<li><a href="qtquick-positioners-example.html">Positioners</a></li>
<li><a href="qtquick-views-example.html">Views</a></li>
<li><a href="qtquick-window-example.html">Windows and Screen</a></li>
<li><a href="qtquick-righttoleft-example.html">Right-to-Left and Text Layout</a></li>
</ul>
</div><div class="doc-column"><p><b>Image and Graphics</b></p>
<ul>
<li><a href="qtquick-imageelements-example.html">Image Elements</a></li>
<li><a href="qtquick-animation-example.html">Animation</a></li>
<li><a href="qtquick-canvas-example.html">Canvas API</a></li>
<li><a href="qtquick-shadereffects-example.html">Shader Effects</a></li>
</ul>
</div></div><div class="multi-column"><div class="doc-column"><p><b>Keyboard, Focus, and Touch</b></p>
<ul>
<li><a href="qtquick-keyinteraction-example.html">Key Interaction</a></li>
<li><a href="qtquick-mousearea-example.html">MouseArea</a></li>
</ul>
</div><div class="doc-column"><p><b>System and Events</b></p>
<ul>
<li><a href="qtquick-threading-example.html">Threading</a></li>
<li><a href="qtquick-quick-accessibility-example.html">Accessibility</a></li>
<li><a href="qtquick-externaldraganddrop-example.html">External Drag and Drop</a></li>
<li><a href="qtquick-draganddrop-example.html">Drag and Drop</a></li>
</ul>
</div><div class="doc-column"><p><b>Scene Graph</b></p>
<ul>
<li><a href="qtquick-scenegraph-openglunderqml-example.html">OpenGL Under QML</a></li>
<li><a href="qtquick-customitems-painteditem-example.html">Painted Item</a></li>
<li><a href="qtquick-scenegraph-customgeometry-example.html">Custom Geometry</a></li>
<li><a href="qtquick-scenegraph-graph-example.html">Graph</a></li>
<li><a href="qtquick-scenegraph-simplematerial-example.html">Simple Material</a></li>
<li><a href="qtquick-scenegraph-textureinsgnode-example.html">Rendering FBOs</a></li>
<li><a href="qtquick-scenegraph-textureinthread-example.html">Rendering FBOs in a thread</a></li>
</ul>
</div></div></div>
<!-- @@@qtquick-codesamples.html -->
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2019 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>
